//=========按键/鼠标事件监听=========//

const { Uiwindow, games } = require('../example/create');

/**按键/鼠标事件监听 */
const listener = module.exports = () => {
    /**UI窗口 */
    if (Uiwindow.isDisplay) {
        games.canvas.addEventListener('click', Uiwindow.listenerEl());
        games.canvas.addEventListener('mousemove', Uiwindow.listenerEl());
    } else {
        games.canvas.removeEventListener('click', Uiwindow.listenerEl());
        games.canvas.removeEventListener('mousemove', Uiwindow.listenerEl());
    }
}